<?php 

header("Content-Type: text/html; charset=UTF-8");

date_default_timezone_set("PRC");

/**
打印
**/
function P($value)
{
	echo "<div style='color:red;border:1px solid blue'>";
	print_r($value);
	echo "</div>";
	echo "<br/>";
}
/**
获取配置
**/
function C($opt=''){
	$config = include ('../config.php');
	if(empty($opt)){
		return $config ;
	}else{
		if(isset($config[$opt])){
			return $config[$opt];
		}else{
			return '该配置不存在';
		}
		
	}
		
}

//转换存储单位
function U($num){

	$unit = $num>pow(1024,3)?array(3,"GB"):($num>pow(1024,2)?array(2,"MB"):array(1,"KB"));

	return round($num/pow(1024,$unit[0]),1).$unit[1];
}








 ?>